import { createApp, ref } from "vue";
import "./style.css";
import App from "./App.vue";
import router from "./router";
import pinia from "./stores/index";

import myPageLayOut from "@/components/pageLayout/index.vue";

import popupsManager from "./manager/popupsManager";
import messageManager from "./manager/messageManager";
import loadingManager from "./manager/loadingManager";

const app = createApp(App);

app.component("my-page", myPageLayOut);

app.use(pinia);
app.use(router);

//屏蔽警告
app.config.warnHandler = () => null;

window.router = router;
window.ref = ref;

app.mount("#app");

new popupsManager();
new messageManager();
new loadingManager();

window.messageBox = messageManager;
window.loading = loadingManager;
